package cn.doitedu.flink.rules;

import redis.clients.jedis.Jedis;

import java.util.TimerTask;

public class LoadRuleRunnable extends TimerTask {

    RuleBean bean;
    public LoadRuleRunnable(RuleBean bean) {
        this.bean = bean;
    }

    @Override
    public void run() {

        Jedis jedis = new Jedis("localhost", 6379);
        String flag = jedis.get("flag");
        //System.out.println("-----------" + flag);
        bean.setFlag(flag);
    }
}
